Skip to content

[pull] main from microsoft:main - #1614

Merged
pull[bot] merged 34 commits into
code:mainfrom
microsoft:main
Aug 20, 2026
Merged

[pull] main from microsoft:main#1614
pull[bot] merged 34 commits into
code:mainfrom
microsoft:main

Conversation

@pull

@pull pull Bot commented Aug 20, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

vritant24 and others added 30 commits July 31, 2026 10:39
Default server-provided custom Chat Completions models to max_completion_tokens, with an advanced experiment-based compatibility override for endpoints that still require max_tokens. Fixes #328418.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move the experiment-based compatibility setting into the advanced manifest section while keeping its public setting ID free of the internal .advanced. prefix.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…#331739)

* Ask the agent SDK about setup instead of guessing from the filesystem

A developer who pays for Claude directly hit a GitHub Copilot sign-in wall,
because session-type availability was inferred by sniffing for config files on
disk. That guess was wrong in both directions: it gated users who had a working
account, and it advertised agents to users who had none.

Replace the inference with what the agent's own SDK reports, and make the SDK
download an explicit choice rather than something that happens on startup.

- Agents publish an SDK setup status (`notDownloaded` / `downloading` /
  `ready`) over the root config channel, plus the capabilities they offer for
  getting an account. The workbench derives "no account" from `ready` + zero
  models, so there is a single wire source per fact.
- Agents declare capabilities only; every user-facing string is localized in
  the workbench via `vs/nls`.
- The download is offered by a banner and performed on request. Consent is
  recorded per agent, so a later version bump re-downloads silently for that
  agent while a different agent still asks.
- Background fetches stay invisible: only the explicit gesture registers
  download progress interest.
- `AgentSdkSetupChannel` holds the nonce handling, in-flight latch and publish
  ordering once, so Claude and Codex differ only in their capability literals.

Removes the filesystem-sniffing paths this replaces: `codexLocalAuth` and the
"we discovered your existing configuration" notification, which asked users to
sign in again after they had already declined the sign-in modal.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Fix two setup-status races found in review

Publish the SDK download status *after* the model catalog on both agents.
Publishing `ready` at the top of `_refreshModels` meant the first refresh
after a download announced "the SDK is here" while `_models` was still
empty -- and `ready` plus zero models is exactly how the window renders
"no account found". The invariant was already documented in the setup
channel's own `_download()`; the refresh path contradicted it.

Re-bind `AgentSdkSetupService` to root state on `onAgentHostStart`.
`rootState` is a getter over a protocol client the host replaces on every
restart and reconnect, so the single constructor-time subscription went
quietly stale -- and because the service is `Delayed`, constructing
before the connection bound the no-op state forever. Pending download
requests are cleared on re-bind too: a request the previous host never
answered never will be, so the Download button comes back rather than
staying suppressed.

Both fixes carry regression tests that were verified to fail without them.
Also corrects the `explicitlyRequested` telemetry doc, which claimed to
carry a click-vs-standing-consent split it does not have, and states the
banner's ambient-host scope in `agentSdkSetupSessionType`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
* modernUI: enhance notification and dialog presentation with customizable insets

* sessions: implement dynamic notification row height for phone layouts

* modernUI: center notification content in touch-sized phone rows and adjust notification positioning

---------

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
…/prune retention) (#331635)

* Initial plan

* Replace external session All mode with 30-day retention

Co-authored-by: benibenj <44439583+benibenj@users.noreply.github.com>

* Limit ESLint worker concurrency

Co-authored-by: benibenj <44439583+benibenj@users.noreply.github.com>

* Revert "Limit ESLint worker concurrency"

This reverts commit 9190dc5.

Co-authored-by: benibenj <44439583+benibenj@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benibenj <44439583+benibenj@users.noreply.github.com>
Await multi-root turn diff computation before releasing the tracked-edit database reference. Add a regression test that verifies asynchronous peer database reads finish before disposal.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Implement code changes to enhance functionality and improve performance

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
…ts-issue-reproduction

chat: support max_completion_tokens for custom models
…330921)

* Initial plan

* Render automation status in leading icon

Co-authored-by: benvillalobos <4691428+benvillalobos@users.noreply.github.com>

* Fix automation status icon alignment

Center the leading icon slot so spinner and status glyphs align with the Automations label.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benvillalobos <4691428+benvillalobos@users.noreply.github.com>
Co-authored-by: Ben Villalobos <bevillal@microsoft.com>
Copilot-Session: f2973122-684b-46c8-a1df-586695137bca
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: make changes diffs responsive

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* sessions: share responsive diff preference

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* sessions: rename diff editor options service

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* sessions: clarify responsive diff accessibility

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add experiment driven inline model feedback survey

Adds a survey that can be attached to chat responses through an experiment
treatment, so a survey can be authored, changed, or retired without shipping
code. When one applies, a combined thumbs up and down control replaces the
usual helpful and unhelpful actions in the response footer and opens a short
multi step survey beneath it.

The survey is fully described by a versioned JSON payload: which responses it
applies to, when it may open on its own, and its steps. Answers are reported as
each step is taken, so surveys the user abandons still produce data, and they
land in GitHub restricted telemetry through a command the Copilot extension
registers.

Manual activation is never rate limited. The pacing rules in the payload govern
only surfacing the user did not ask for: a weekly cooldown, a per session cap, a
probability that ramps with use, and a trigger for switching off the surveyed
model.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: aaf67de5-2dc8-437c-961b-257c488475a7

* Fix fixture services and address review feedback

Registers the survey service with the shared chat fixture services, which the
component fixture tests build a real chat list renderer from. Without it the
resize observer harness fixtures failed to load.

Also from review:
- Re-check a cached survey against the current config and the feedback setting,
  so retiring a treatment or turning feedback off takes effect. A survey the
  user is part way through is left alone, since a treatment that briefly
  resolves to nothing must not take a form away mid answer.
- Release per session state when a session is disposed, rather than holding it
  until the treatment changes or the window closes.
- Move focus to the close button after submitting, so keyboard users are not
  left on the document body while the acknowledgement is showing.
- Report the feedback control as expanded rather than pressed, since it
  discloses a panel rather than holding a state.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: aaf67de5-2dc8-437c-961b-257c488475a7

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: aaf67de5-2dc8-437c-961b-257c488475a7
* chore: add more foundry-local-sdk patches

* Bump cachesalt

* Add back pip auth for Darwin

* chore: add param for restored case

* Fix flaky McpStdioStateHandler 'sigkill after grace' test

Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
…331154) (#331840)

* agentHost: stop the agent editing host-created attachment snapshots (#331154)

When a user-message attachment is not a plain, already-existing file:// file
(pasted content, an unsaved editor, or a read-only git: diff), the Agent Host
snapshots the bytes to .../agentSessionData/<session>/attachments/... and handed
the copy to the model as an ordinary editable file. The model then edited the
throwaway copy instead of returning the transformed content / editing the real
file. This is the uncovered sibling of #319314 (fix #319452 only exempted
existing file:// attachments).

Keep each snapshot visible (path preserved so the model can read it) but signal
it read-only so the agent does not edit it:

- Tag every host-created snapshot with a _meta marker (new
  agentSnapshotAttachmentMeta) at the snapshot-write point and when a snapshot
  copy is re-attached from the attachments folder.
- Copilot: send the snapshot as {type:'file', path} with a plain display name and
  deliver a read-only note via the additionalContext channel (rendered as a
  <system_reminder>) on the main turn; steering does not fire the
  user-prompt-submitted hook, so its note is appended to the steering prompt as a
  <reminder> block (stripped from the bubble, forwarded to the model).
- Codex: annotate the existing @path mention with "(read-only snapshot - do not
  edit)".
- Claude: annotate the existing <system-reminder> path line likewise.
- Write-deny backstop: when a provider raises an interactive confirmation for a
  write under the session attachments dir, the host hard-denies it before
  auto-approval.

Known limitation: the write-deny only fires on an interactive permission prompt,
so in autopilot/bypass modes the read-only signal is advisory only. A
mode-independent guarantee (marking snapshots read-only on disk) is tracked as a
follow-up.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: address PR review feedback for snapshot read-only handling (#331154)

- agentService: match the session attachments dir by URI containment
  (extUriBiasedIgnorePathCase.isEqualOrParent) instead of a string prefix, so a
  sibling like .../attachments-backup is not mis-tagged and a case-differing
  snapshot path is still recognised. Applied to both _isRewritableAttachment and
  _isUntaggedSnapshotResource via a shared _isUnderAttachmentsRoot helper.
- copilot: keep a snapshotted selection on the selection path (preserving the
  selected text and range) instead of collapsing it to a whole-file attachment;
  the read-only signal already rides the additionalContext/<reminder> note.
  Removed the now-redundant snapshot branch in _toSdkAttachment.
- agentSnapshotAttachmentMeta: correct the doc — Copilot sends the file path and
  conveys read-only out-of-band, it does not omit the path.
- tests: add an AgentSideEffects pending-confirmation test that a write under the
  session attachments dir is hard-denied even with global auto-approve, with no
  confirmation-ready action dispatched; update the Copilot snapshot-selection test
  to expect the selection path.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: stop a failed git probe from stalling Agent Merge

A session with Agent Merge enabled could sit idle forever without ever
binding to its pull request, so review comments and CI failures never
reached it.

`_computeSessionGitState` treats every probe as independent and populates
fields best-effort. When `git status` failed -- most often a timeout under
load, which writes nothing to stderr and so logged nothing at all -- it
still returned an object, just without a branch. `_setSessionGitState`
replaces persisted git state wholesale, so that object overwrote the good
branch with `{"baseBranchName":"main"}`.

Nothing then repaired it. `AgentMergeController._evaluate` bails on a
missing branch before it reaches the refresh that would recompute it, and
the lazy refresh on subscribe only fires when git state is entirely
absent, so a partial state masked it. For a session held resident by Agent
Merge alone -- no client watching, no edits landing -- neither of the
remaining refresh triggers fires either, leaving it to re-read the same
stale state on the 10 minute backstop indefinitely.

- Return `undefined` from `_computeSessionGitState` when the status probe
  fails, so callers keep the state they already had.
- Refresh git state in `_evaluate` before giving up on the branch, which
  also recovers sessions already holding a branch-less state.
- Treat a branch-less state as missing in the subscribe-time refresh.
- Log git failures that produce no stderr, so a timed-out probe is no
  longer invisible.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: distinguish a detached HEAD from a failed git probe

Addresses PR review feedback: keying the repair off a missing `branchName`
alone also matched a detached HEAD, which reports no branch by design.
Those sessions would have refreshed git state on every evaluation --
a periodic git call and log noise that could never produce a branch.

`parseGitStatusV2` already recognises `(detached)`; it now reports that as
`isDetachedHead` so the distinction survives into persisted session git
state, and a shared `needsSessionGitStateRefresh` predicate keeps the
Agent Merge and subscribe-time call sites in agreement about which states
are worth recomputing.

The controller additionally caps the repair at one attempt per runtime, so
any other checkout that cannot report a branch costs a single git call
rather than one per backstop, and logs a warning when a refresh still
yields no branch.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…x. (#331803)

* Removing managed settings check

* updating types for sandbox configuration

* fixing compile errors

* updates to disable sandbox toggle when managed settings are enabled
* sessions: move chat actions to overflow

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* sessions: align command center workspace label

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* sessions: address chat header review feedback

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* sessions: label workspace-less command center

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* sessions: label sessions without workspace

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* test: provide complete session workspace fixture

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* sessions: add new chat to session item menu

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* sessions: separate new chat list action

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* sessions: disable side chats without workspace

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
perf: persist state between startup runs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: polish automation run history list
* Let the setup banner reload an agent's configuration

A user who finishes setup outside the app — `claude login` in a terminal,
an exported key — leaves no signal the app can see, so the banner kept
asking them to sign in to something they had already signed in to. Give
them a way to say "look again", and rename the docs link to "learn more"
now that it is one of two links rather than the only one.

The re-look is the tail of a download promoted to its own gesture:
restart chat discovery, then refresh models. `AgentSdkSetupChannel` grows
a second request key rather than per-agent code, so agent #3 still needs
no edit here — one consumed nonce per key, cleared as it is claimed, so a
repeat press still lands.

The reload clause folds into each of the four `noAccount` sentences
rather than trailing them: it is unconditional, so the table stays at
four branches and no localized string is assembled from fragments.

* Rank the no-account copy as the buttons rank it, and harden its links

Read the sentence in the order the routes are weighted: GitHub sign-in leads,
as the primary button; the provider sign-in follows; reload and docs trail,
being the copy's only links rather than buttons. Reload and docs become their
own sentences — kept as trailing clauses they would have fallen under the "if
you already set up Claude elsewhere" conditional, which does not scope docs.

Addresses review feedback: build both `command:` hrefs through
`createCommandUri` instead of by hand (`encodeURIComponent` leaves `)` alone,
so an agent id containing one closed the markdown link destination early), and
escape the host-supplied display name and sign-in provider before interpolating
them into markdown this banner trusts for two commands.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Rewrite the no-account copy, and point Claude at its integrations docs

The four sentences now put every sign-in route and the reload into one "or"
list, ranked as the buttons rank them, and give the docs their own trailing
sentence. Claude's docs URL moves to the third-party integrations page, which
is what "other ways to set up Claude" actually means: Console, Bedrock, Vertex,
Foundry, Teams and Enterprise. "Set up" is the verb, two words, as the rest of
the string already had it.

Both agents' URL constants still described the workbench as labelling a button.
It has been a link since docs stopped being an action.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
* Move the scenario runner out of the MCP server

The validate-ui-scenario skill runs `runScenario`, which drives VS Code through
`test/automation` and writes an evidence bundle. None of that is MCP: the runner
loads no MCP module at runtime, and the SDK import it inherited was type-only, so
TypeScript already elided it. It only lived under `test/mcp` because that is where
the evidence pipeline was first written.

That matters now: deleting the MCP server would take the skill with it.

Move the six files that have nothing to do with MCP into a new `test/scenario`
package, and leave `test/mcp` as one of its consumers alongside the skill. The MCP
evidence tools move to `test/mcp/src/evidenceTools.ts`, where the server-specific
schemas belong. Deleting `test/mcp` now removes only MCP code.

Drop the step banner along with it. `showOverlay` appended a banner to the DOM of
the product under test, which can shift layout and influence focus, so the runner
always opted out via VSCODE_EVIDENCE_CLEAN_CAPTURE. With the runner as the only
caller that opinion is unanimous, so the overlay and its opt-out both go and the
capture is unconditionally faithful. Step titles are still rendered onto the
finished recording by renderEvidenceChapters.

The new package emits declarations, matching `test/automation`, so the MCP server
keeps real types rather than silently degrading to `any`.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: adb443eb-11e5-40a1-8608-7f593fa79485

* Add the lockfile for the new scenario package

Registering `test/scenario` in `build/npm/dirs.ts` makes the root install run npm
in that directory, and CI uses `npm ci`, which requires a lockfile. Every other
package registered there has one, so a clean CI install failed immediately with
ENOENT on `test/scenario/package-lock.json` before anything compiled.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: adb443eb-11e5-40a1-8608-7f593fa79485

* Notify on the extracted scenario package

`test/mcp/**` notifies @TylerLeonhardt, so moving the runner to `test/scenario`
silently dropped notifications for it. Point the new path at the owner of the
validate-ui-scenario skill.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: adb443eb-11e5-40a1-8608-7f593fa79485

* Do not re-declare @types/node in the scenario package

The root package already declares `@types/node` as a devDependency, so the
extracted package inherits it through normal ancestor resolution; declaring it
again added a dependency that the OSS license check cannot cover, because
`@types/node` ships no LICENSE file and is not in ClearlyDefined or
cglicenses.json.

Verified against the state CI produces: `npm ci` in `test/scenario` installs no
`@types/node`, and both packages still compile, so the types resolve from the
repository root as intended.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: adb443eb-11e5-40a1-8608-7f593fa79485

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: adb443eb-11e5-40a1-8608-7f593fa79485
* chat: observe view title height

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chat: use disposable title resize observer

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI and others added 4 commits August 20, 2026 15:01
* Initial plan

* Fix shadow DOM context menu layering

Co-authored-by: amunger <2019016+amunger@users.noreply.github.com>

* Fix notebook context menu layering

Mount shadow DOM context views at the workbench container so notebook-local stacking contexts cannot obscure them behind adjacent parts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Scope shadow context menu root mounting

Mount fixed-overflow editor context menus at their window root so notebook menus can escape local stacking contexts, while preserving explicit local shadow-root containers such as menuAsChild.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: amunger <2019016+amunger@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: fix Copilot telemetry provider

Use the session URI scheme for tool-call and tool-approval compatibility events so Agent Host rows consistently report the canonical provider.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: handle peer chat telemetry providers

Derive compatibility-event providers from the owning session so peer chat resources do not report the ahp-chat scheme.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…review

Fix PowerShell quoting for runInTerminal environment values
* sessions: respect metadata pill placement in tabs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* sessions: gate tabs header presentation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pull pull Bot locked and limited conversation to collaborators Aug 20, 2026
@pull pull Bot added the ⤵️ pull label Aug 20, 2026
@pull
pull Bot merged commit 7edc21d into code:main Aug 20, 2026
6 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.